package com.example.ibsp_demo.pojo.entity.content;

import java.util.Date;

public class Image {
    private Integer imageId;
    private Integer uid;
    private String imagePath;
    private String imageType;
    private Date uploadTime;
    private Boolean isUsed;

    // 无参构造函数
    public Image() {
    }

    // 有参构造函数
    public Image(Integer imageId, Integer uid, String imagePath, String imageType, Date uploadTime, Boolean isUsed) {
        this.imageId = imageId;
        this.uid = uid;
        this.imagePath = imagePath;
        this.imageType = imageType;
        this.uploadTime = uploadTime;
        this.isUsed = isUsed;
    }

    // Getter 和 Setter 方法
    public Integer getImageId() {
        return imageId;
    }

    public void setImageId(Integer imageId) {
        this.imageId = imageId;
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public String getImagePath() {
        return imagePath;
    }

    public void setImagePath(String imagePath) {
        this.imagePath = imagePath;
    }

    public String getImageType() {
        return imageType;
    }

    public void setImageType(String imageType) {
        this.imageType = imageType;
    }

    public Date getUploadTime() {
        return uploadTime;
    }

    public void setUploadTime(Date uploadTime) {
        this.uploadTime = uploadTime;
    }

    public Boolean getIsUsed() {
        return isUsed;
    }

    public void setIsUsed(Boolean isUsed) {
        this.isUsed = isUsed;
    }

    // 优化的 toString 方法
    @Override
    public String toString() {
        return "TImage{" +
                "imageId=" + imageId +
                ", uid=" + uid +
                ", imagePath='" + '\'' +
                ", imageType='" + imageType + '\'' +
                ", uploadTime=" + uploadTime +
                ", isUsed=" + isUsed +
                '}';
    }
}